package com.zshy.base.demo.domain.demo.model;

import com.zshy.base.core.contract.BaseRepository;
import com.zshy.base.core.contract.Model;
import com.zshy.base.demo.domain.demo.repository.DemoRepository;
import com.zshy.base.orm.annotation.TenantId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

/**
 * Demo仓库，主要是给人去学习用(Demo)领域类
 *
 * 主要是做增删改的操作，不包含查询操作
 *
 * @author zhouhengzhe
 * @since 2023-12-01 17:25:29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class DemoBO extends Model {

    @Schema(description = "主键")
    private String id;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建人编码")
    private String createBy;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "更新人编码")
    private String updateBy;

    @Schema(description = "更新人")
    private String updater;
    @TenantId
    @Schema(description = "应用ID")
    private String tenantId;

    @Schema(description = "年龄")
    private Integer age;

    @Schema(description = "名字")
    private String name;

    public static DemoRepository repository() {
        return BaseRepository.of(DemoBO.class);
    }
}
